/*
 * This file is part of ddesktop: remote desktop system for iPad 
 *
 * Copyright (C) 2010 Kazuhiro Satoh
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program. if not, see <http://www.gnu.org/licenses/>.
 */


#ifndef CONSTANTS_H
#define CONSTANTS_H


#define DD_START_CODE  '$'


enum DDUIEventOwner{
	DD_MOUSE_LEFT_BUTTON = 1,
	DD_MOUSE_RIGHT_BUTTON,
	DD_MOUSE_MIDDLE_BUTTON,
	DD_KEYBOARD
};

enum DDUIEventType {
	DD_MOUSE_BUTTON_DOWN = 1,
	DD_MOUSE_BUTTON_UP,
	DD_MOUSE_BUTTON_MOVE,
	DD_MOUSE_WHEEL,
	
	DD_KEYBOARD_PUSH,
	DD_KEYBOARD_DOWN,
	DD_KEYBOARD_UP,
	
	DD_WINDOW_MOVE,
	DD_WINDOW_RESIZE,
	DD_WINDOW_MAXIMIZE,
	DD_WINDOW_MINIMIZE,
	DD_WINDOW_CLOSE
};


enum DDCommandType{
	DD_REQUEST_IMAGE_HEADER			= 'h',
	DD_REQUEST_IMAGE_DATA			= 'd',
	DD_CHANGE_DOWNLOAD_FRAME_RECT	= 'f',
	DD_CHANGE_IMAGE_QUALITY			= 'q',
	DD_CHANGE_IMAGE_RESOLUTION		= 'r',
	DD_SEND_UI_EVENT				= 'E',
	DD_SEND_KEYINPUTS				= 'k',
	DD_SEND_DATA_PORT_NUMBER		= 'p',
	DD_REQUEST_SCREEN_SIZE			= 'S',
	DD_START_DOWNSTREAM				= 's',
	DD_STOP_DOWNSTREAM				= 'e'
};


enum DDKeyCode{
	DD_KEY_BACKSPACE = 0x81,
	DD_KEY_TAB,
	DD_KEY_RETURN,
	DD_KEY_SHIFT,
	DD_KEY_CONTROL,
	DD_KEY_ALT,
	DD_KEY_ESCAPE,
	DD_KEY_SPACE,
	DD_KEY_PAGEUP,
	DD_KEY_PAGEDOWN,
	DD_KEY_END,
	DD_KEY_HOME,
	DD_KEY_LEFT,
	DD_KEY_UP,
	DD_KEY_RIGHT,
	DD_KEY_DOWN,
	DD_KEY_INSERT,
	DD_KEY_DELETE,
	DD_KEY_HANKAKU_ZENKAKU,
	
	// shortcut keys
	DD_KEY_MAXIMIZE_WINDOW,
	DD_KEY_MINIMIZE_WINDOW,
	DD_KEY_CLOSE_WINDOW,
	DD_KEY_CTRL_ALT_DEL,
	DD_KEY_UNDO,
	DD_KEY_CUT,
	DD_KEY_COPY,
	DD_KEY_PASTE
};

#endif
